/*
 * Copyright (c) 2006-2018, RT-Thread Development Team
 *
 * SPDX-License-Identifier: Apache-2.0
 *
 * Change Logs:
 * Date           Author       Notes
 * 2018-11-06     SummerGift   first version
 */

#include <rtthread.h>
#include <rtdevice.h>
#include <board.h>
#include "drv_led.h"

#define SOFTWARE_VERSION    "1.0.1"

extern int init(void);

int main(void)
{
    rt_device_t sys_led_dev;

    rt_kprintf("SoftVer:%s\r\n", SOFTWARE_VERSION);

    init();

    sys_led_dev = rt_device_find("sys_led");
    RT_ASSERT(sys_led_dev != RT_NULL);
    rt_device_open(sys_led_dev, RT_DEVICE_FLAG_RDWR);
   
    while (1)
    {
        rt_device_control(sys_led_dev, CMD_LED_TOGGLE, NULL);
        rt_thread_mdelay(500);
    }

    return RT_EOK;
}
